<template>
    <el-link
        :type="type"
        size="mini"
        :title="topTitle"
        :disabled="disabled === '' || !!disabled"
        class="icon-but"
        @click="onClick"
        :underline="false"
        >{{ $attrs.text }}</el-link
    >
</template>
<script lang="ts">
import { Component, Emit, Prop, Vue } from 'vue-property-decorator';

@Component({
    name: 'RiskLink',
})
export default class RiskLink extends Vue {
    // 针对需求选择可以参考element
    @Prop({ type: String }) type!: string;
    // icon图标
    // @Prop({ type: String }) icon: string;
    @Prop({ default: false }) disabled?: boolean | '';
    // 提示音
    @Prop({ type: String }) topTitle!: string;
    @Emit('on-click')
    onClick(): void {}
}
</script>
<style lang="scss" scoped>
.icon-but {
    padding: 2px 8px !important;
    margin: 0;
    margin-right: 10px;

    & /deep/ .el-button--mini {
        padding: 2px 8px !important;
    }
}
</style>
